import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from '../views/Login'
import Register from '../views/Register'
import Home from '../views/Home'
import Welcome from '../views/Welcome'
import file1 from '../views/file/file1'
import file2 from '../views/file/file2'
import file3 from '../views/file/file3'
import file4 from '../views/file/file4'
import file5 from '../views/file/file5'
import file6 from '../views/file/file6'
import file7 from '@/views/file/file7'
import draftfile from '../views/file/draftfile'
import sign from '@/views/file/sign'
import filesave from '../views/file/filesave'
import newfile from '../views/newfile/newfile' 
import imefile from '../views/filedetails/mefile'
import rejectfile from '@/views/filedetails/rejectfile'
import sendfile from '@/views/filedetails/sendfile'
import truth from '@/views/truth/truth'
import truthdetail from '@/views/truth/truthdetail'
Vue.use(VueRouter)

const routes = [
  {path:'/',redirect: '/login'},
  {path: '/login', component: Login},
  {path:'/register',component:Register},
  {path:'/home',component:Home,
  redirect:'/welcome',children:[{
    path:'/welcome',component:Welcome
  },{
    path:'/file1',component:file1
  },
  {
    path:'/file2',component:file2
  },
  {
    path:'/file3',component:file3
  },
  {
    path:'/file4',component:file4
  },
  {
    path:'/file5',component:file5
  },
  {
    path:'/file6',component:file6
  },
  {
    path:'/file7',component:file7
  },
  {
    path:'/draftfile',component:draftfile
  },
  {
    path:'/filesave',component:filesave
  },
  {
    path:'/newfile',component:newfile
  },{
    name:'mefile',
    path:'/mefile',component:imefile
  },
  {
    name:'rejectfile',
    path:'/rejectfile',component:rejectfile
  },
  {
    name:'sendfile',
    path:'/sendfile',component:sendfile
  },
  {
    name:'truth',
    path:'/truth',component:truth
  },
  {
    name:'truthdetail',
    path:'/truthdetail',component:truthdetail
  },
]},{
  name:'sign',
    path:'/sign',component:sign
}
]

const router = new VueRouter({
  mode:'hash',
  base: process.env.BASE_URL,
  routes
})

export default router
